package com.servlet;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/** 系统级别的配置 */
public final class M {
	//////////////////// 公共字典////////////////////////////////
	public static final int CODE_非法尝试 = 401;
	public static final int CODE_未登录 = 102;
	public static final int CODE_已登录 = 1;
	public static final String MSG_验证通过 = "验证通过";
	public static final String MSG_频繁 = "您的操作太频繁了!";
	public static final String MSG_注册成功 = "注册成功!";
	public static final String MSG_注册失败 = "注册失败,请重试!";
	public static final String MSG_手机验证码错误 = "手机短信验证码不正确";
	public static final String MSG_验证码错误 = "验证码不正确";
	public static final String MSG_登录名或密码错误 = "登录名或密码错误";
	public static final String MSG_登录成功 = "登录成功";
	public static final String MSG_不能为空 = "必填项不能为空";
	public static final String MSG_请求短信验证码 = "请先请求短信验证码";
	public static final String MSG_请求错误 = "请求的url错误,请重新确认";
	public static final String URL_login = "/admin/login.jsp";
	public static final String URL_fwlogin = "/jsp/fw_login.jsp";
	public static final String URL_tzlogin = "/jsp/tz_login.jsp";
	public static final String URL_main = "/admin/main.jsp";
	public static final String URL_404 = "/admin/404.jsp";
	public static final String MSG_阻拦 = "您的操作行为异常,系统自动拦截,请在30分钟后再操作!";
	public static final String MSG_关闭 = "网站维护,暂时关闭,如有疑问联系客服";

	public static final int U管理员 = 1;
	public static Map<Integer, String> MRole = new HashMap<>();// 角色在初始化的时候 保存
	public static List<Map<String, Object>> LRole = new ArrayList<Map<String, Object>>();
	//////////////////////// 每套系统有关的字典定义///////////////////////

	public static final char F是 = 'y';
	public static final char F否 = 'n';

	public static final String get是否(char sf) {
		if (sf == F是)
			return "是";
		else
			return "否";
	}

	public static final String get是与否(String sf) {
		// System.out.println(sf);
		if (sf.equals("y"))
			return "是";
		else
			return "否";
	}

}
